#ifndef _MYTASK_H
#define _MYTASK_H

#include "01_Threadpool.hpp"
#include "05_Task.hpp"
#include <time.h>
#include <unistd.h>     // unix standard
#include <stdlib.h>
#include <stdio.h>

//class TaskQueue;

class MyTask
:public Task
{
public:
    //MyTask(ThreadPool& threadpool, int value)
    //    :_threadpool(threadpool)
    //    ,_value(value){}
    MyTask(int value = 0)
        :_value(value){
            printf("MyTask | create num = %d", _value);
        }
    //~MyTask() = default;

    void process() override
    {
        srand(time(nullptr));

        _value = rand() % 1000;
        printf("MyTask | input num = %d \n",_value);
        
    }
private:
    //ThreadPool& _threadpool;
    int _value;
};

#endif

